<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9"/>
<title>NGUI: UI2DSpriteAnimation Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">NGUI
   &#160;<span id="projectnumber">3.11.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Packages</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('class_u_i2_d_sprite_animation.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="#properties">Properties</a> &#124;
<a href="class_u_i2_d_sprite_animation-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">UI2DSpriteAnimation Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Small script that makes it easy to create looping 2D sprite animations.  
 <a href="class_u_i2_d_sprite_animation.html#details">More...</a></p>
<div class="dynheader">
Inheritance diagram for UI2DSpriteAnimation:</div>
<div class="dyncontent">
 <div class="center">
  <img src="class_u_i2_d_sprite_animation.png" usemap="#UI2DSpriteAnimation_map" alt=""/>
  <map id="UI2DSpriteAnimation_map" name="UI2DSpriteAnimation_map">
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a47ef9c935c97abfb0bf5fc0d208708b0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i2_d_sprite_animation.html#a47ef9c935c97abfb0bf5fc0d208708b0">Play</a> ()</td></tr>
<tr class="memdesc:a47ef9c935c97abfb0bf5fc0d208708b0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Continue playing the animation. If the animation has reached the end, it will restart from beginning  <a href="#a47ef9c935c97abfb0bf5fc0d208708b0">More...</a><br /></td></tr>
<tr class="separator:a47ef9c935c97abfb0bf5fc0d208708b0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a771b55bcbc4f5146e543f74a57189d84"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i2_d_sprite_animation.html#a771b55bcbc4f5146e543f74a57189d84">Pause</a> ()</td></tr>
<tr class="memdesc:a771b55bcbc4f5146e543f74a57189d84"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pause the animation.  <a href="#a771b55bcbc4f5146e543f74a57189d84">More...</a><br /></td></tr>
<tr class="separator:a771b55bcbc4f5146e543f74a57189d84"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2f88e3986e6f2a55e1f9831dd18abe7a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i2_d_sprite_animation.html#a2f88e3986e6f2a55e1f9831dd18abe7a">ResetToBeginning</a> ()</td></tr>
<tr class="memdesc:a2f88e3986e6f2a55e1f9831dd18abe7a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reset the animation to the beginning.  <a href="#a2f88e3986e6f2a55e1f9831dd18abe7a">More...</a><br /></td></tr>
<tr class="separator:a2f88e3986e6f2a55e1f9831dd18abe7a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:ade40af8ece0b674903fd1df24bdf0328"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i2_d_sprite_animation.html#ade40af8ece0b674903fd1df24bdf0328">frameIndex</a> = 0</td></tr>
<tr class="memdesc:ade40af8ece0b674903fd1df24bdf0328"><td class="mdescLeft">&#160;</td><td class="mdescRight">Index of the current frame in the sprite animation.  <a href="#ade40af8ece0b674903fd1df24bdf0328">More...</a><br /></td></tr>
<tr class="separator:ade40af8ece0b674903fd1df24bdf0328"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa27f89a77ccdc14376ed10f82e97fd9d"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i2_d_sprite_animation.html#aa27f89a77ccdc14376ed10f82e97fd9d">ignoreTimeScale</a> = true</td></tr>
<tr class="memdesc:aa27f89a77ccdc14376ed10f82e97fd9d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Should this animation be affected by time scale?  <a href="#aa27f89a77ccdc14376ed10f82e97fd9d">More...</a><br /></td></tr>
<tr class="separator:aa27f89a77ccdc14376ed10f82e97fd9d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af2b3472f30a2629f9703c223152b51b5"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i2_d_sprite_animation.html#af2b3472f30a2629f9703c223152b51b5">loop</a> = true</td></tr>
<tr class="memdesc:af2b3472f30a2629f9703c223152b51b5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Should this animation be looped?  <a href="#af2b3472f30a2629f9703c223152b51b5">More...</a><br /></td></tr>
<tr class="separator:af2b3472f30a2629f9703c223152b51b5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a79da8b0c636d5f1aa78b67ad0a7a4b06"><td class="memItemLeft" align="right" valign="top">UnityEngine.Sprite[]&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i2_d_sprite_animation.html#a79da8b0c636d5f1aa78b67ad0a7a4b06">frames</a></td></tr>
<tr class="memdesc:a79da8b0c636d5f1aa78b67ad0a7a4b06"><td class="mdescLeft">&#160;</td><td class="mdescRight">Actual sprites used for the animation.  <a href="#a79da8b0c636d5f1aa78b67ad0a7a4b06">More...</a><br /></td></tr>
<tr class="separator:a79da8b0c636d5f1aa78b67ad0a7a4b06"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:aecef45aa20f5aba2c379516d0ddda5ff"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i2_d_sprite_animation.html#aecef45aa20f5aba2c379516d0ddda5ff">framerate</a> = 20</td></tr>
<tr class="memdesc:aecef45aa20f5aba2c379516d0ddda5ff"><td class="mdescLeft">&#160;</td><td class="mdescRight">How many frames there are in the animation per second.  <a href="#aecef45aa20f5aba2c379516d0ddda5ff">More...</a><br /></td></tr>
<tr class="separator:aecef45aa20f5aba2c379516d0ddda5ff"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="properties"></a>
Properties</h2></td></tr>
<tr class="memitem:a9569b78e1529ab8d1b45ea8a25571b56"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i2_d_sprite_animation.html#a9569b78e1529ab8d1b45ea8a25571b56">isPlaying</a><code> [get]</code></td></tr>
<tr class="memdesc:a9569b78e1529ab8d1b45ea8a25571b56"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns is the animation is still playing or not  <a href="#a9569b78e1529ab8d1b45ea8a25571b56">More...</a><br /></td></tr>
<tr class="separator:a9569b78e1529ab8d1b45ea8a25571b56"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afbf6d998b315d6b050d171f9a3ee5ab1"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i2_d_sprite_animation.html#afbf6d998b315d6b050d171f9a3ee5ab1">framesPerSecond</a><code> [get, set]</code></td></tr>
<tr class="memdesc:afbf6d998b315d6b050d171f9a3ee5ab1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Animation framerate.  <a href="#afbf6d998b315d6b050d171f9a3ee5ab1">More...</a><br /></td></tr>
<tr class="separator:afbf6d998b315d6b050d171f9a3ee5ab1"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Small script that makes it easy to create looping 2D sprite animations. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a771b55bcbc4f5146e543f74a57189d84"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void UI2DSpriteAnimation.Pause </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pause the animation. </p>

</div>
</div>
<a class="anchor" id="a47ef9c935c97abfb0bf5fc0d208708b0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void UI2DSpriteAnimation.Play </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Continue playing the animation. If the animation has reached the end, it will restart from beginning </p>

</div>
</div>
<a class="anchor" id="a2f88e3986e6f2a55e1f9831dd18abe7a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void UI2DSpriteAnimation.ResetToBeginning </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Reset the animation to the beginning. </p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="ade40af8ece0b674903fd1df24bdf0328"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int UI2DSpriteAnimation.frameIndex = 0</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Index of the current frame in the sprite animation. </p>

</div>
</div>
<a class="anchor" id="aecef45aa20f5aba2c379516d0ddda5ff"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int UI2DSpriteAnimation.framerate = 20</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>How many frames there are in the animation per second. </p>

</div>
</div>
<a class="anchor" id="a79da8b0c636d5f1aa78b67ad0a7a4b06"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">UnityEngine.Sprite [] UI2DSpriteAnimation.frames</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Actual sprites used for the animation. </p>

</div>
</div>
<a class="anchor" id="aa27f89a77ccdc14376ed10f82e97fd9d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool UI2DSpriteAnimation.ignoreTimeScale = true</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Should this animation be affected by time scale? </p>

</div>
</div>
<a class="anchor" id="af2b3472f30a2629f9703c223152b51b5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool UI2DSpriteAnimation.loop = true</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Should this animation be looped? </p>

</div>
</div>
<h2 class="groupheader">Property Documentation</h2>
<a class="anchor" id="afbf6d998b315d6b050d171f9a3ee5ab1"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int UI2DSpriteAnimation.framesPerSecond</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">get</span><span class="mlabel">set</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Animation framerate. </p>

</div>
</div>
<a class="anchor" id="a9569b78e1529ab8d1b45ea8a25571b56"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool UI2DSpriteAnimation.isPlaying</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">get</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns is the animation is still playing or not </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>D:/WorkDir/Unity3D_Work/taidou_arpg/Assets/NGUI/Scripts/UI/UI2DSpriteAnimation.cs</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="class_u_i2_d_sprite_animation.html">UI2DSpriteAnimation</a></li>
    <li class="footer">Generated on Sat Jan 4 2020 22:30:28 for NGUI by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.9 </li>
  </ul>
</div>
</body>
</html>
